#pragma once
#include "afxwin.h"
#include "resource.h"
#include "afxcolorbutton.h"


// _GraphPropertiesMinMax dialog
class _GraphControl;
class _GraphPropertiesMinMax : public CDialogEx
{
        DECLARE_DYNAMIC(_GraphPropertiesMinMax)

    public:
        _GraphPropertiesMinMax(CWnd* pParent = NULL);   // standard constructor
        virtual ~_GraphPropertiesMinMax();
        void updateMinMaxEditBoxes();
        void setGraphControlHandle(int Handle)
        {
            m_GraphControlHandle = Handle;
        }

        // Dialog Data
        enum { IDD = IDD_FLEX_GRAPH_PROPERTIES_MIN_MAX };

    protected:
        virtual void DoDataExchange(CDataExchange* pDX);    // DDX/DDV support

        DECLARE_MESSAGE_MAP()
    public:
        CEdit m_EditMaxX;
        CEdit m_EditMaxY;
        CEdit m_EditMinX;
        CEdit m_EditMinY;
        _GraphControl* m_pGraphControl;
        int m_GraphControlHandle;
        afx_msg void OnBnClickedButtonApplyMinMax();
        afx_msg void OnShowWindow(BOOL bShow, UINT nStatus);
        afx_msg void OnBnClickedButtonResetToDefault();
        virtual void OnOK();
        virtual void OnCancel();

        CEdit m_EditTitle;
        CEdit m_EditXCaption;
        CEdit m_EditYCaption;
        CComboBox m_ComboBorderSize;
        afx_msg void OnCbnSelchangeComboBorderSize();
        afx_msg void OnClickedColorctrlborder();
        CMFCColorButton m_ColorCtrlBorderColor;
        afx_msg void OnBnClickedCheckGrid();
        CButton m_CheckGrid;
        CButton m_CheckTracking;
        afx_msg void OnBnClickedCheckTracking();
        afx_msg void OnChangeEditTitle();
        afx_msg void OnChangeEditXcaption();
        afx_msg void OnChangeEditYcaption();
        afx_msg void OnEnChangeEditMinY();
        afx_msg void OnEnChangeEditMinX();
        afx_msg void OnEnChangeEditMaxX();
        afx_msg void OnEnChangeEditMaxY();
        bool NoUpdate;
        CMFCColorButton m_ColorControlBackground;
        afx_msg void OnBnClickedColorctrlbackground();
        afx_msg HBRUSH OnCtlColor(
            CDC* pDC,
            CWnd* pWnd,
            UINT nCtlColor);
        HBRUSH m_hbr;
        afx_msg void OnBnClickedColorControlAxis();
        CMFCColorButton m_ColorControlAxis;
};
